#include "TcSetting.h"
#include <stdio.h>

gchar *convertToUtf8 (char *string)
{

	gchar *utf = NULL;
	utf = g_locale_to_utf8 (string, -1, NULL, NULL, NULL);

	return utf;
}

GdkPixbuf *loadPixFromFile (const char *filename)
{
	GError *error = NULL;
	GdkPixbuf *pix = gdk_pixbuf_new_from_file (filename, &error);
	if (pix == NULL) {
		g_printerr ("Erro ao carregar ficheiro: #%d %s\n", error->code,
				error->message);
		g_error_free (error);
		return NULL;
	}
	return pix;
}
